package us.icitap.commandcenter.ui.custom;

import org.vaadin.dialogs.ConfirmDialog;

import com.vaadin.ui.UI;
import com.vaadin.ui.themes.Reindeer;

public class CustConfirmDialog{
	
public static void show(final ConfirmDialogAction confActions,UI ui,String pyetja){
		
	ConfirmDialog d = ConfirmDialog.show(ui, "Konfirmimi", pyetja,
		        "PO", "JO", new ConfirmDialog.Listener() {

		            public void onClose(ConfirmDialog dialog) {
		                if (dialog.isConfirmed()) {
		                	//PO
			                  confActions.actYes();  
		                } else {
		                	//JO
			                   confActions.actNO();
		                  
		                }
		            }
		        });
	
	d.setStyleName(Reindeer.WINDOW_BLACK);
	d.setContentMode(ConfirmDialog.ContentMode.HTML);
	d.setHeight("100px");
	d.getCancelButton().setStyleName(Reindeer.BUTTON_LINK);
	}
}
